﻿using System;
using System.Collections.Generic;
using System.Net;
using System.Xml.Serialization;

namespace AutomatedLab
{
    [Serializable]
    public class VirtualNetwork
    {
        private string name;
        private IPNetwork addressSpace;
        private SwitchType switchType;
        private string adapterName;
        private string locationName;
        private VirtualizationHost hostType;
        private List<AzureSubnet> subnets = new List<AzureSubnet>();
        private List<string> connectToVnets = new List<string>();
        private List<IPAddress> dnsServers;
        //private List<string> connectFromSubnet = new List<string>();
        //private List<string> connectToSubnet = new List<string>();

        public List<AzureSubnet> Subnets
        {
            get { return subnets; }
            set { subnets = value; }
        }

        [XmlAttribute]
        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        public IPNetwork AddressSpace
        {
            get { return addressSpace; }
            set { addressSpace = value; }
        }

        [XmlAttribute]
        public SwitchType SwitchType
        {
            get { return switchType; }
            set { switchType = value; }
        }

        [XmlAttribute]
        public string AdapterName
        {
            get { return adapterName; }
            set { adapterName = value; }
        }

        [XmlAttribute]
        public string LocationName
        {
            get { return locationName; }
            set { locationName = value; }
        }

        [XmlAttribute]
        public VirtualizationHost HostType
        {
            get { return hostType; }
            set { hostType = value; }
        }
        public List<string> ConnectToVnets
        {
            get { return connectToVnets; }
            set { connectToVnets = value; }
        }

        public List<IPAddress> DnsServers
        {
            get { return dnsServers; }
            set { dnsServers = value; }
        }

        //public List<string> ConnectFromSubnet
        //{
        //    get { return connectFromSubnet; }
        //    set { connectFromSubnet = value; }
        //}

        //public List<string> ConnectToSubnet
        //{
        //    get { return connectToSubnet; }
        //    set { connectToSubnet = value; }
        //}

        public override string ToString()
        {
            return name;
        }
    }
}
